import { createRouter, createWebHashHistory } from "vue-router";

export const menuRouter = [
  {
    path: "/usercenter", // #test 客户端默认跳转到这里
    // path: "/home",
    name: "Home",
    component: () => import("@/views/home/index.vue"),
    meta: { icon: "menu-hot", iconH: "menu-hot-h", title: "热门", noNeedLogin: true }
  }
];
export const constantRoutes = [
  {
    path: "/",
    redirect: menuRouter[0].path,
    component: () => import("@/layout/index.vue"),
    children: menuRouter
  }
];
export default createRouter({
  history: createWebHashHistory(),
  scrollBehavior: () => ({ top: 0 }),
  routes: constantRoutes
});
